import http from "./http";

/**
 * 拉取指标形态设置
 * @param {Object} option
 * @return {Promise} Array
 */
export async function getInfo(option) {
  const url = "/api/shape/setting/info";
  const params = {
    ...option,
  };
  const res = await http.get(url, { params });
  return res.data;
}

/**
 * 上传指标形态设置
 * @param {Object} option
 * @return {Promise} Array
 */
export async function saveOrUpdate(option) {
  const url = "/api/shape/setting/saveOrUpdate";
  const params = {
    ...option,
  };
  const res = await http.post(url, params);
  return res.data;
}
